<template>
<el-result icon="error" title="很抱歉发生错误了" :sub-title="{params}">
    <template #extra>
        <el-button type="primary" @click="goBack">返回上一页</el-button>
    </template>
    
</el-result>
</template>

<script lang="ts">
import { defineComponent } from 'vue'
import { useRoute, useRouter } from 'vue-router'

export default defineComponent({
    setup() {
        const route = useRoute()
        const router = useRouter();
        function goBack() {
            router.back();
        }
        return {
            params:JSON.stringify(route.params,null,4),
            goBack
        }
    },
})
</script>
